package com.example.module_park.home


import com.example.module_park.net.ApiService
import com.example.module_park.net.HomeNetModule
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class HomeRepository @Inject constructor() {
    @Inject
    @HomeNetModule.CommonMainApi
    lateinit var api: ApiService

    fun getNotice(page: Int, size: Int)= flow {
        emit(api.noticeList(page, size))
    }.flowOn(Dispatchers.IO)
}